package com.eightbears.beboy.base.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.eightbears.greendao.DaoMaster;
import com.eightbears.greendao.DistrictDao;
import com.github.yuweiguocn.library.greendao.MigrationHelper;

/**
 * Created by Bao on 2017/7/3.
 */

public class MySQLiteOpenHelper extends DaoMaster.OpenHelper {

    public MySQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        MigrationHelper.migrate(db, DistrictDao.class);
    }
}
